package com.zhhh.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import com.zhhh.domain.BUser;

public interface BUserRepository extends CrudRepository<BUser, Integer> {

//	BUser findById(Integer uid);

	//List<BUser> findByOSysCode(String oSysCode);

	@Query("select s from BUser s where s.OSysCode like CONCAT(:osysCode,'%')")
	List<BUser> findByUserList(@Param("osysCode") String osysCode);
	
	@Query("select s from BUser s where s.OSysCode = -1")
	List<BUser> queryNotDeptUserAll();

	BUser findByUsername(String username);

	

}
